// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   EditProfileDialog.java

package com.boci.clientapp.profile;

import com.boci.clientapp.main.*;
import com.boci.clientapp.profile.action.EditProfileAction;
import com.boci.clientapp.profile.vo.AccountProfileVO;
import com.boci.common.constant.ClientAppConst;
import com.boci.common.ui.AbstractDialog;
import com.boci.common.util.MessagesConfigurator;
import com.boci.common.util.PerformanceLogger;
import com.boci.common.vo.ResponseVO;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.*;
import javax.swing.*;
import javax.swing.border.LineBorder;

public class EditProfileDialog extends AbstractDialog
{

    public EditProfileDialog(TradingClientApp owner, boolean modal, Locale pLocale)
    {
        super(owner, modal, pLocale, true);
        initGUI();
        setText(pLocale);
    }

    public void setFont(Locale pLocale)
    {
        lblPersonalInfo.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblEngName.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblEngNameResult.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblBankName.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblBankNameResult.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblBankAccNo.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblBankAccNoResult.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblAccNoNote1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblAccNoNote2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblHomeAddr.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtHomeAddrResult1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtHomeAddrResult2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtHomeAddrResult3.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblCountryCode.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblAreaCode.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblTelNo.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblDayTimePhone.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtDayTimePhoneResult1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtDayTimePhoneResult2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtDayTimePhoneResult3.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblEveningPhone.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtEveningPhoneResult1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtEveningPhoneResult2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtEveningPhoneResult3.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblMobilePhone.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtMobilePhoneResult1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtMobilePhoneResult2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtMobilePhoneResult3.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblFaxNo.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtFaxNoResult1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtFaxNoResult2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        txtFaxNoResult3.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblEmailAddr.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        txtEmailAddrResult.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblMarketingMaterial.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblMarketMaterialNote1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblMarketMaterialNote2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblSMS.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblSMSNote1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblSMSNote2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblSMSWarning1.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblSMSWarning2.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblAccPref.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        lblPreferLang.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        cmbPreferLang.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        lblDefaultAccNo.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        cmbDefaultAccNo.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
        btnSave.setFont(ClientAppLoader.getPlainButtonFont(pLocale));
        btnCancel.setFont(ClientAppLoader.getPlainButtonFont(pLocale));
    }

    public void setText(Locale pLocale)
    {
        super.setText(pLocale);
        currentLocale = pLocale;
        MessagesConfigurator msgConf = ClientAppLoader.getMessagesConfigurator();
        setFont(pLocale);
        setFieldLocation(pLocale);
        setTitle(msgConf.getUIMessages("PROFILE.EDIT_TITLE", pLocale));
        lblPersonalInfo.setText(msgConf.getUIMessages("PROFILE.PERSONAL_INFO", pLocale));
        lblEngName.setText(msgConf.getUIMessages("PROFILE.ENGLISH_NAME", pLocale));
        lblBankName.setText(msgConf.getUIMessages("PROFILE.BANK_NAME", pLocale));
        lblBankAccNo.setText(msgConf.getUIMessages("PROFILE.BANK_ACCT_NO", pLocale));
        lblAccNoNote1.setText(msgConf.getUIMessages("PROFILE.ACCT_NO_NOTE1", pLocale));
        lblAccNoNote2.setText(msgConf.getUIMessages("PROFILE.ACCT_NO_NOTE2", pLocale));
        lblHomeAddr.setText(msgConf.getUIMessages("PROFILE.HOME_ADDRESS", pLocale));
        lblCountryCode.setText(msgConf.getUIMessages("PROFILE.COUNTRY_CODE", pLocale));
        lblAreaCode.setText(msgConf.getUIMessages("PROFILE.AREA_CODE", pLocale));
        lblTelNo.setText(msgConf.getUIMessages("PROFILE.TEL_NO", pLocale));
        lblDayTimePhone.setText(msgConf.getUIMessages("PROFILE.DAYTIME_PHONE", pLocale));
        lblEveningPhone.setText(msgConf.getUIMessages("PROFILE.EVENING_PHONE", pLocale));
        lblMobilePhone.setText(msgConf.getUIMessages("PROFILE.MOBILE_PHONE", pLocale));
        lblFaxNo.setText(msgConf.getUIMessages("PROFILE.FAX_NO", pLocale));
        lblEmailAddr.setText(msgConf.getUIMessages("PROFILE.EMAIL_ADDRESS", pLocale));
        lblMarketingMaterial.setText(msgConf.getUIMessages("PROFILE.MARKETING_MATERIAL", pLocale));
        lblMarketMaterialNote1.setText(msgConf.getUIMessages("PROFILE.MARKETING_NOTE1", pLocale));
        lblMarketMaterialNote2.setText(msgConf.getUIMessages("PROFILE.MARKETING_NOTE2", pLocale));
        lblSMS.setText(msgConf.getUIMessages("PROFILE.SMS", pLocale));
        lblSMSNote1.setText(msgConf.getUIMessages("PROFILE.SMS_NOTE1", pLocale));
        lblSMSNote2.setText(msgConf.getUIMessages("PROFILE.SMS_NOTE2", pLocale));
        lblSMSWarning1.setText(msgConf.getUIMessages("PROFILE.SMS_WARNING1", pLocale));
        lblSMSWarning2.setText(msgConf.getUIMessages("PROFILE.SMS_WARNING2", pLocale));
        lblAccPref.setText(msgConf.getUIMessages("PROFILE.ACCOUNT_PREF", pLocale));
        lblPreferLang.setText(msgConf.getUIMessages("PROFILE.PREFER_LANG", pLocale));
        lblDefaultAccNo.setText(msgConf.getUIMessages("PROFILE.DEFAULT_ACCT_NO", pLocale));
        btnSave.setText(msgConf.getUIMessages("PROFILE.SAVE", pLocale));
        btnCancel.setText(msgConf.getUIMessages("PROFILE.CANCEL", pLocale));
        String strPreferLang[] = msgConf.getMsgArray("", ClientAppLoader.getPrefer_Languages(), pLocale);
        int intOldSelection = cmbPreferLang.getSelectedIndex();
        cmbPreferLang.setSelectedIndex(intOldSelection);
        cmbPreferLang.setModel(new DefaultComboBoxModel(strPreferLang));
    }

    private void setFieldLocation(Locale pLocale)
    {
        if(pLocale.equals(ClientAppConst.EN_US))
            lblCountryCode.setBounds(133, 190, 78, 20);
        else
            lblCountryCode.setBounds(140, 190, 78, 20);
    }

    private void initGUI()
    {
        getContentPane().setBackground(Color.WHITE);
        setSize(519, 597);
        getContentPane().setLayout(null);
        lblPersonalInfo = new JLabel();
        lblPersonalInfo.setBackground(new Color(140, 143, 145));
        lblPersonalInfo.setForeground(new Color(255, 255, 255));
        lblPersonalInfo.setBorder(new LineBorder(new Color(140, 143, 145), 1, false));
        lblPersonalInfo.setOpaque(true);
        lblPersonalInfo.setBounds(5, 5, 498, 20);
        getContentPane().add(lblPersonalInfo);
        lblEngName = new JLabel();
        lblEngName.setHorizontalAlignment(4);
        lblEngName.setBounds(10, 25, 120, 20);
        getContentPane().add(lblEngName);
        lblEngNameResult = new JLabel();
        lblEngNameResult.setBounds(135, 25, 400, 20);
        getContentPane().add(lblEngNameResult);
        lblBankName = new JLabel();
        lblBankName.setHorizontalAlignment(4);
        lblBankName.setBounds(10, 45, 120, 20);
        getContentPane().add(lblBankName);
        lblBankNameResult = new JLabel();
        lblBankNameResult.setBounds(135, 45, 400, 20);
        getContentPane().add(lblBankNameResult);
        lblBankAccNo = new JLabel();
        lblBankAccNo.setHorizontalAlignment(4);
        lblBankAccNo.setBounds(10, 65, 120, 20);
        getContentPane().add(lblBankAccNo);
        lblBankAccNoResult = new JLabel();
        lblBankAccNoResult.setBounds(135, 65, 400, 20);
        getContentPane().add(lblBankAccNoResult);
        lblAccNoNote1 = new JLabel();
        lblAccNoNote1.setBounds(100, 85, 400, 20);
        getContentPane().add(lblAccNoNote1);
        lblAccNoNote2 = new JLabel();
        lblAccNoNote2.setBounds(100, 105, 400, 20);
        getContentPane().add(lblAccNoNote2);
        lblHomeAddr = new JLabel();
        lblHomeAddr.setHorizontalAlignment(4);
        lblHomeAddr.setBounds(10, 125, 120, 20);
        getContentPane().add(lblHomeAddr);
        txtHomeAddrResult1 = new JTextField();
        txtHomeAddrResult1.setBounds(135, 125, 320, 20);
        getContentPane().add(txtHomeAddrResult1);
        txtHomeAddrResult2 = new JTextField();
        txtHomeAddrResult2.setBounds(135, 147, 320, 20);
        getContentPane().add(txtHomeAddrResult2);
        txtHomeAddrResult3 = new JTextField();
        txtHomeAddrResult3.setBounds(135, 169, 320, 20);
        getContentPane().add(txtHomeAddrResult3);
        lblCountryCode = new JLabel();
        lblCountryCode.setBounds(133, 190, 78, 20);
        getContentPane().add(lblCountryCode);
        lblAreaCode = new JLabel();
        lblAreaCode.setBounds(220, 190, 120, 20);
        getContentPane().add(lblAreaCode);
        lblTelNo = new JLabel();
        lblTelNo.setBounds(350, 190, 120, 20);
        getContentPane().add(lblTelNo);
        lblDayTimePhone = new JLabel();
        lblDayTimePhone.setHorizontalAlignment(4);
        lblDayTimePhone.setBounds(10, 210, 120, 20);
        getContentPane().add(lblDayTimePhone);
        txtDayTimePhoneResult1 = new JTextField();
        txtDayTimePhoneResult1.setBounds(140, 210, 70, 20);
        getContentPane().add(txtDayTimePhoneResult1);
        txtDayTimePhoneResult2 = new JTextField();
        txtDayTimePhoneResult2.setBounds(220, 210, 120, 20);
        getContentPane().add(txtDayTimePhoneResult2);
        txtDayTimePhoneResult3 = new JTextField();
        txtDayTimePhoneResult3.setBounds(350, 210, 120, 20);
        getContentPane().add(txtDayTimePhoneResult3);
        lblEveningPhone = new JLabel();
        lblEveningPhone.setHorizontalAlignment(4);
        lblEveningPhone.setBounds(10, 232, 120, 20);
        getContentPane().add(lblEveningPhone);
        txtEveningPhoneResult1 = new JTextField();
        txtEveningPhoneResult1.setBounds(140, 232, 70, 20);
        getContentPane().add(txtEveningPhoneResult1);
        txtEveningPhoneResult2 = new JTextField();
        txtEveningPhoneResult2.setBounds(220, 232, 120, 20);
        getContentPane().add(txtEveningPhoneResult2);
        txtEveningPhoneResult3 = new JTextField();
        txtEveningPhoneResult3.setBounds(350, 232, 120, 20);
        getContentPane().add(txtEveningPhoneResult3);
        lblMobilePhone = new JLabel();
        lblMobilePhone.setHorizontalAlignment(4);
        lblMobilePhone.setBounds(10, 254, 120, 20);
        getContentPane().add(lblMobilePhone);
        txtMobilePhoneResult1 = new JTextField();
        txtMobilePhoneResult1.setBounds(140, 254, 70, 20);
        getContentPane().add(txtMobilePhoneResult1);
        txtMobilePhoneResult2 = new JTextField();
        txtMobilePhoneResult2.setBounds(220, 254, 120, 20);
        getContentPane().add(txtMobilePhoneResult2);
        txtMobilePhoneResult3 = new JTextField();
        txtMobilePhoneResult3.setBounds(350, 254, 120, 20);
        getContentPane().add(txtMobilePhoneResult3);
        lblFaxNo = new JLabel();
        lblFaxNo.setHorizontalAlignment(4);
        lblFaxNo.setBounds(10, 276, 120, 20);
        getContentPane().add(lblFaxNo);
        txtFaxNoResult1 = new JTextField();
        txtFaxNoResult1.setBounds(140, 276, 70, 20);
        getContentPane().add(txtFaxNoResult1);
        txtFaxNoResult2 = new JTextField();
        txtFaxNoResult2.setBounds(220, 276, 120, 20);
        getContentPane().add(txtFaxNoResult2);
        txtFaxNoResult3 = new JTextField();
        txtFaxNoResult3.setBounds(350, 276, 120, 20);
        getContentPane().add(txtFaxNoResult3);
        lblEmailAddr = new JLabel();
        lblEmailAddr.setHorizontalAlignment(4);
        lblEmailAddr.setBounds(60, 305, 135, 20);
        getContentPane().add(lblEmailAddr);
        txtEmailAddrResult = new JTextField();
        txtEmailAddrResult.setBounds(200, 305, 230, 20);
        getContentPane().add(txtEmailAddrResult);
        lblMarketingMaterial = new JLabel();
        lblMarketingMaterial.setHorizontalAlignment(4);
        lblMarketingMaterial.setBounds(35, 335, 160, 20);
        getContentPane().add(lblMarketingMaterial);
        ckMarketingMaterial = new JCheckBox();
        ckMarketingMaterial.setOpaque(false);
        ckMarketingMaterial.setBounds(200, 335, 20, 20);
        getContentPane().add(ckMarketingMaterial);
        lblMarketMaterialNote1 = new JLabel();
        lblMarketMaterialNote1.setBounds(225, 329, 285, 20);
        getContentPane().add(lblMarketMaterialNote1);
        lblMarketMaterialNote2 = new JLabel();
        lblMarketMaterialNote2.setBounds(225, 342, 285, 20);
        getContentPane().add(lblMarketMaterialNote2);
        lblSMS = new JLabel();
        lblSMS.setHorizontalAlignment(4);
        lblSMS.setBounds(16, 365, 179, 20);
        getContentPane().add(lblSMS);
        ckSMS = new JCheckBox();
        ckSMS.setOpaque(false);
        ckSMS.setHorizontalAlignment(0);
        ckSMS.setMargin(new Insets(0, 0, 0, 0));
        ckSMS.setBounds(200, 365, 20, 20);
        getContentPane().add(ckSMS);
        lblSMSNote1 = new JLabel();
        lblSMSNote1.setBounds(225, 359, 285, 20);
        getContentPane().add(lblSMSNote1);
        lblSMSNote2 = new JLabel();
        lblSMSNote2.setBounds(225, 372, 285, 20);
        getContentPane().add(lblSMSNote2);
        lblSMSWarning1 = new JLabel();
        lblSMSWarning1.setForeground(new Color(255, 0, 0));
        lblSMSWarning1.setBounds(225, 386, 285, 20);
        getContentPane().add(lblSMSWarning1);
        lblSMSWarning2 = new JLabel();
        lblSMSWarning2.setForeground(new Color(255, 0, 0));
        lblSMSWarning2.setBounds(225, 399, 285, 20);
        getContentPane().add(lblSMSWarning2);
        lblAccPref = new JLabel();
        lblAccPref.setForeground(new Color(255, 255, 255));
        lblAccPref.setBorder(new LineBorder(new Color(140, 143, 145), 1, false));
        lblAccPref.setBackground(new Color(140, 143, 145));
        lblAccPref.setOpaque(true);
        lblAccPref.setBounds(5, 419, 500, 20);
        getContentPane().add(lblAccPref);
        lblPreferLang = new JLabel();
        lblPreferLang.setHorizontalAlignment(4);
        lblPreferLang.setBounds(10, 450, 145, 20);
        lblPreferLang.setBounds(10, 472, 145, 20);
        getContentPane().add(lblPreferLang);
        cmbPreferLang = new JComboBox();
        cmbPreferLang.setBorder(new LineBorder(Color.LIGHT_GRAY, 1, false));
        cmbPreferLang.setBounds(165, 450, 200, 20);
        cmbPreferLang.setBounds(165, 472, 200, 20);
        getContentPane().add(cmbPreferLang);
        lblDefaultAccNo = new JLabel();
        lblDefaultAccNo.setHorizontalAlignment(4);
        lblDefaultAccNo.setBounds(10, 450, 145, 20);
        getContentPane().add(lblDefaultAccNo);
        cmbDefaultAccNo = new JComboBox();
        cmbDefaultAccNo.setBorder(new LineBorder(Color.LIGHT_GRAY, 1, false));
        cmbDefaultAccNo.setBounds(165, 450, 200, 20);
        getContentPane().add(cmbDefaultAccNo);
        btnSave = new JButton();
        btnSave.setBounds(130, 498, 120, 25);
        btnSave.setActionCommand("SAVE");
        btnSave.addActionListener(this);
        getContentPane().add(btnSave);
        btnCancel = new JButton();
        btnCancel.setBounds(253, 498, 120, 25);
        btnCancel.setActionCommand("CANCEL");
        btnCancel.addActionListener(this);
        getContentPane().add(btnCancel);
    }

    public void refresh(ResponseVO pResponseVO)
    {
        if(pResponseVO instanceof AccountProfileVO)
        {
            AccountProfileVO accountProfileVO = (AccountProfileVO)pResponseVO;
            currentVO = accountProfileVO;
            lblEngNameResult.setText(accountProfileVO.getEnglishName());
            lblBankNameResult.setText(accountProfileVO.getBankAccountName());
            lblBankAccNoResult.setText(accountProfileVO.getDisplayBankAccNo(currentLocale));
            txtHomeAddrResult1.setText(accountProfileVO.getHomeAddress1());
            txtHomeAddrResult2.setText(accountProfileVO.getHomeAddress2());
            txtHomeAddrResult3.setText(accountProfileVO.getHomeAddress3());
            txtDayTimePhoneResult1.setText(accountProfileVO.getDaytimePhoneCountryCode());
            txtDayTimePhoneResult2.setText(accountProfileVO.getDaytimePhoneAreaCode());
            txtDayTimePhoneResult3.setText(accountProfileVO.getDaytimePhoneTelNo());
            txtEveningPhoneResult1.setText(accountProfileVO.getEveningPhoneCountryCode());
            txtEveningPhoneResult2.setText(accountProfileVO.getEveningPhoneAreaCode());
            txtEveningPhoneResult3.setText(accountProfileVO.getEveningPhoneTelNo());
            txtMobilePhoneResult1.setText(accountProfileVO.getMobilePhoneCountryCode());
            txtMobilePhoneResult2.setText(accountProfileVO.getMobilePhoneAreaCode());
            txtMobilePhoneResult3.setText(accountProfileVO.getMobilePhoneTelNo());
            txtFaxNoResult1.setText(accountProfileVO.getFaxCountryCode());
            txtFaxNoResult2.setText(accountProfileVO.getFaxAreaCode());
            txtFaxNoResult3.setText(accountProfileVO.getFaxTelNo());
            txtEmailAddrResult.setText(accountProfileVO.getEmail());
            String strPreferLang[] = ClientAppLoader.getPrefer_Languages();
            for(int i = 0; i < strPreferLang.length; i++)
                if(strPreferLang[i].equals(accountProfileVO.getPreferLang()))
                    cmbPreferLang.setSelectedIndex(i);

            String strAccountNos[] = ApplicationService.getInstance().getAccountNos();
            cmbDefaultAccNo.setModel(new DefaultComboBoxModel(strAccountNos));
            cmbDefaultAccNo.setSelectedItem(accountProfileVO.getDefaultAccountNo());
        }
        if(ClientAppLoader.enablePreferLang())
        {
            lblPreferLang.setVisible(true);
            cmbPreferLang.setVisible(true);
        } else
        {
            lblPreferLang.setVisible(false);
            cmbPreferLang.setVisible(false);
        }
        setDefFocus();
    }

    public void actionPerformed(ActionEvent e)
    {
        String strActionType = e.getActionCommand();
        if(validate(strActionType))
        {
            PerformanceLogger.startAppTimer();
            EditProfileAction editProfileAction = new EditProfileAction();
            editProfileAction.doProcess(getInputValue(strActionType), strActionType);
            PerformanceLogger.stopAppTimer();
            PerformanceLogger.doLog((new StringBuilder()).append("EDIT_PROFILE_DIALOG.").append(strActionType).toString());
        }
    }

    public HashMap getInputValue(String pActionType)
    {
        HashMap inpMap = new HashMap();
        if(pActionType.equals("SAVE"))
        {
            inpMap.put("engName", lblEngNameResult.getText());
            inpMap.put("textfield", txtHomeAddrResult1.getText());
            inpMap.put("textfield2", txtHomeAddrResult2.getText());
            inpMap.put("add3", txtHomeAddrResult3.getText());
            inpMap.put("tel1", txtDayTimePhoneResult1.getText());
            inpMap.put("tel2", txtDayTimePhoneResult2.getText());
            inpMap.put("tel3", txtDayTimePhoneResult3.getText());
            inpMap.put("eveTel1", txtEveningPhoneResult1.getText());
            inpMap.put("eveTel2", txtEveningPhoneResult2.getText());
            inpMap.put("eveTel3", txtEveningPhoneResult3.getText());
            inpMap.put("mobile1", txtMobilePhoneResult1.getText());
            inpMap.put("mobile2", txtMobilePhoneResult2.getText());
            inpMap.put("mobile3", txtMobilePhoneResult3.getText());
            inpMap.put("fax1", txtFaxNoResult1.getText());
            inpMap.put("fax2", txtFaxNoResult2.getText());
            inpMap.put("fax3", txtFaxNoResult3.getText());
            inpMap.put("textfield6", txtEmailAddrResult.getText());
            inpMap.put("email_meterial_com", ckMarketingMaterial.isSelected() ? "Y" : "N");
            inpMap.put("sms_trd_com", ckSMS.isSelected() ? "Y" : "N");
            inpMap.put("select3", cmbDefaultAccNo.getSelectedItem());
            String strPreferLang[] = ClientAppLoader.getPrefer_Languages();
            inpMap.put("select5", strPreferLang[cmbPreferLang.getSelectedIndex()]);
            if(currentVO != null)
            {
                inpMap.put("co_addr", currentVO.getCorrespondingAddr());
                inpMap.put("workAddr1", currentVO.getOfficeAddress1());
                inpMap.put("workAddr2", currentVO.getOfficeAddress2());
                inpMap.put("workAddr3", currentVO.getOfficeAddress3());
            }
        }
        return inpMap;
    }

    public boolean validate(String pActionType)
    {
        ArrayList msgKeyList = new ArrayList();
        boolean validFlag = true;
        if(pActionType.equals("SAVE"))
        {
            if((txtHomeAddrResult1.getText() == null || txtHomeAddrResult1.getText().trim().length() == 0) && (txtHomeAddrResult2.getText() == null || txtHomeAddrResult2.getText().trim().length() == 0) && (txtHomeAddrResult3.getText() == null || txtHomeAddrResult3.getText().trim().length() == 0))
            {
                validFlag = false;
                msgKeyList.add("PROFILE_MISSING_HOME_ADDR");
            }
            if(txtDayTimePhoneResult3.getText() == null || txtDayTimePhoneResult3.getText().length() == 0)
            {
                validFlag = false;
                msgKeyList.add("PROFILE_MISSING_DAYTIME_PHONE");
            }
            if(txtEveningPhoneResult3.getText() == null || txtEveningPhoneResult3.getText().length() == 0)
            {
                validFlag = false;
                msgKeyList.add("PROFILE_MISSING_EVENING_PHONE");
            }
            if(txtMobilePhoneResult3.getText() == null || txtMobilePhoneResult3.getText().length() == 0)
            {
                validFlag = false;
                msgKeyList.add("PROFILE_MISSING_MOBILE_PHONE");
            }
        }
        if(!validFlag)
            ApplicationService.getInstance().showWarningDialog(null, msgKeyList);
        return validFlag;
    }

    public void setDefFocus()
    {
        SwingUtilities.invokeLater(new Runnable() {

            public void run()
            {
                txtHomeAddrResult1.requestFocus();
            }
        }
);
    }

    private JLabel lblPersonalInfo;
    private JLabel lblEngName;
    private JLabel lblEngNameResult;
    private JLabel lblBankName;
    private JLabel lblBankNameResult;
    private JLabel lblBankAccNo;
    private JLabel lblBankAccNoResult;
    private JLabel lblAccNoNote1;
    private JLabel lblAccNoNote2;
    private JLabel lblHomeAddr;
    private JTextField txtHomeAddrResult1;
    private JTextField txtHomeAddrResult2;
    private JTextField txtHomeAddrResult3;
    private JLabel lblCountryCode;
    private JLabel lblAreaCode;
    private JLabel lblTelNo;
    private JLabel lblDayTimePhone;
    private JTextField txtDayTimePhoneResult1;
    private JTextField txtDayTimePhoneResult2;
    private JTextField txtDayTimePhoneResult3;
    private JLabel lblEveningPhone;
    private JTextField txtEveningPhoneResult1;
    private JTextField txtEveningPhoneResult2;
    private JTextField txtEveningPhoneResult3;
    private JLabel lblMobilePhone;
    private JTextField txtMobilePhoneResult1;
    private JTextField txtMobilePhoneResult2;
    private JTextField txtMobilePhoneResult3;
    private JLabel lblFaxNo;
    private JTextField txtFaxNoResult1;
    private JTextField txtFaxNoResult2;
    private JTextField txtFaxNoResult3;
    private JLabel lblEmailAddr;
    private JTextField txtEmailAddrResult;
    private JLabel lblMarketingMaterial;
    private JCheckBox ckMarketingMaterial;
    private JLabel lblMarketMaterialNote1;
    private JLabel lblMarketMaterialNote2;
    private JLabel lblSMS;
    private JLabel lblSMSNote1;
    private JLabel lblSMSNote2;
    private JLabel lblSMSWarning1;
    private JLabel lblSMSWarning2;
    private JCheckBox ckSMS;
    private JLabel lblAccPref;
    private JLabel lblPreferLang;
    private JComboBox cmbPreferLang;
    private JLabel lblDefaultAccNo;
    private JComboBox cmbDefaultAccNo;
    private JButton btnSave;
    private JButton btnCancel;
    private Locale currentLocale;
    AccountProfileVO currentVO;

}
